package com.chance.cc.crawler.development.command.publish.pcauto;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.pcauto.*;
import com.chance.cc.crawler.development.command.script.pcauto.PcAutoWebCrawlerScript;
import com.chance.cc.crawler.development.command.trigger.domain.pcauto.PcAutoWebSchedulerTrigger;
import org.junit.Test;

/**
 * @author lt
 * @version 1.0
 * @date 2021-01-13 11:41:29
 * @email okprog@sina.com
 */
public class PcAutoPublishCrawlerJob {
    /**
     * 太平洋测试发布
     */
    @Test
    public void publishTestCrawlerJob(){
        CrawlerJob crawlerJob = PcAutoArticleTraceCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        PcAutoWebSchedulerTrigger.publishPcAutoTestCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
//        PcAutoWebCrawlerScript.publishCrawlerNodeScript();
    }

    /**
     * 太平洋文章实时采集任务发布
     */
    @Test
    public void publishArticleCrawlerJob(){
        CrawlerJob crawlerJob = PcAutoArticleCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        PcAutoWebSchedulerTrigger.publishPcAutoArticleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }
    /**
     * 太平洋文章回溯采集任务发布
     */
    @Test
    public void publishArticleTraceCrawlerJob(){
        CrawlerJob crawlerJob = PcAutoArticleTraceCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        PcAutoWebSchedulerTrigger.publishPcAutoArticleTraceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }


    /**
     * 太平洋视频实时采集任务发布
     */
    @Test
    public void publishVideoCrawlerJob(){
        CrawlerJob crawlerJob = pcAutoVideoCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        PcAutoWebSchedulerTrigger.publishPcAutoVideoCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }
    /**
     * 太平洋视频回溯采集任务发布
     */
    @Test
    public void publishVideoTraceCrawlerJob(){
        CrawlerJob crawlerJob = PcAutoVideoTraceCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        PcAutoWebSchedulerTrigger.publishPcAutoVideoTraceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }


    /**
     * 太平洋论坛实时采集任务发布
     */
    @Test
    public void publishForumReleaseCrawlerJob(){
        CrawlerJob crawlerJob = PcAutoForumReleaseCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        PcAutoWebSchedulerTrigger.publishPcAutoForumReleaseCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }
    /**
     * 太平洋论坛最新回复采集任务发布
     */
    @Test
    public void publishForumReplyCrawlerJob(){
        CrawlerJob crawlerJob = PcAutoForumReplyCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        PcAutoWebSchedulerTrigger.publishPcAutoForumReplyCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }

    /**
     * 太平洋论坛追溯三天互动采集任务发布
     */
    @Test
    public void publishForumInteractionCrawlerJob(){
        CrawlerJob crawlerJob = PcAutoForumInteractionCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        PcAutoWebSchedulerTrigger.publishPcAutoForumInteractionCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }



    /**
     * 太平洋口碑实时采集任务发布
     */
    @Test
    public void publishPraiseCrawlerJob(){
        CrawlerJob crawlerJob = PcAutoPraiseCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        PcAutoWebSchedulerTrigger.publishPcAutoPraiseCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }
    /**
     * 太平洋口碑回溯采集任务发布
     */
    @Test
    public void publishPraiseTraceCrawlerJob(){
        CrawlerJob crawlerJob = PcAutoPraiseTraceCrawlerSchedulerJob.publishPcAutoCrawlerSchedulerJobInfo();
        PcAutoWebSchedulerTrigger.publishPcAutoPraiseTraceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey());
    }

}
